module.exports = function main(kilometer,waittime) {
    let fare=0;
    if(kilometer===0){
       fare=0;
    }
    else if(kilometer<0||waittime<0){
        return 'ERRO';
    }
    else if(kilometer>0&&kilometer<=2){
        fare=6;
    }
    else if(kilometer>2&&kilometer<=8){
        fare=6+(kilometer-2)*0.8;
    }
    else{
      fare= 10.8+(kilometer-8)*1.2;
    }
    fare+=0.25*waittime;
    fare=Math.round(fare);
    return fare;
};